package com.hm.base.def;

/**
 * @author shishun.wang
 * @date 下午2:56:50 2017年8月21日
 * @version 1.0
 * @describe
 */
public enum AsynDownloadUploadStatuEnum {

	FINISHED(0, "已完成"),

	FAILURE(1, "失败"),

	PROCESSING(2, "处理中"),

	DELETE(3, "已删除");

	private int status;

	private String desc;

	private AsynDownloadUploadStatuEnum(int status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	public String desc() {
		return this.desc;
	}

	public int status() {
		return this.status;
	}

	public static AsynDownloadUploadStatuEnum trance(int status) {
		for (AsynDownloadUploadStatuEnum enumTmp : AsynDownloadUploadStatuEnum.values()) {
			if (enumTmp.status == status) {
				return enumTmp;
			}
		}
		return null;
	}
}
